package com.ky.home.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ky.common.vo.R;
import com.ky.home.entity.Fenshuxian;
import com.ky.home.mapper.FenshuxianMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author lgh
 * @since 2024-06-20
 */
@RestController
@RequestMapping("/home")
public class FenshuxianController {
    @Autowired
    FenshuxianMapper fenshuxianMapper;
    @RequestMapping("/fenshuxian/selectBySchoolName/{schoolName}")
    public R selectBySchoolName(@PathVariable("schoolName") String schoolName) {
        QueryWrapper<Fenshuxian> fenshuxianQueryWrapper = new QueryWrapper<>();
        fenshuxianQueryWrapper.eq("school_name",schoolName);
        return R.ok(fenshuxianMapper.selectBySchoolName(schoolName));
    }
}

